﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xKnight.Attacking.Xss;
using xKnight.Data;
using xKnight.Models;

namespace xKnight.Attacking.EncodedXss
{
    internal class EncodedXssAttacker : Attacker
    {
        #region Constructors

        public EncodedXssAttacker(Attack attack, int numberOfThreads, Host[] hosts)
            :base(attack,numberOfThreads,hosts)
        {

        }

        #endregion

        #region Interface

        public override void Attack()
        {
            StartAgents();
        }

        #endregion

        #region Protected Methods

        protected override AttackingSharedReource CreateAttackingSharedReource(params object[] inputs)
        {
            Form[] forms = DataLayer.GetForms(_hosts);
            object sharedLock = new object();

            return new XssAttackingSharedReource(forms, sharedLock, _attack);
        }

        #endregion
    }
}
